//
//  DataView.m
//  MY Project For Sport
//
//  Created by dllo on 16/2/1.
//  Copyright © 2016年 dilo. All rights reserved.
//

#import "DataView.h"
#import <DKNightVersion.h>

#define WIDTH self.frame.size.width
#define HEIGHT self.frame.size.height

#define WEIGHTT [UIScreen mainScreen].bounds.size.width / 375
#define HEIGHTT [UIScreen mainScreen].bounds.size.height / 667


@interface DataView ()

@property (nonatomic, retain) UILabel *labelForScore;
@property (nonatomic, retain) UILabel *labelForCount;
@property (nonatomic, retain) UILabel *result;
@property (nonatomic, retain) UILabel *ballCount;
@property (nonatomic, retain) UILabel *ballOfScore;

@end



@implementation DataView

- (void)dealloc {

    [_labelForCount release];
    [_labelForScore release];
    [_ballCount release];
    [_ballOfScore release];
    [_result release];
    [super dealloc];

}

- (instancetype)initWithFrame:(CGRect)frame {

    self = [super initWithFrame:frame];
    
    if (self) {
        
        
        [self createSubview];
    }

    return self;

}

- (void)createSubview {

    self.labelForScore = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH / 15, WIDTH / 28, WIDTH / 4, WIDTH / 15)];
    [self addSubview:self.labelForScore];
    [_labelForScore release];
    self.labelForScore.text = @"积分榜";
    self.labelForScore.font = [UIFont systemFontOfSize:19];
    self.labelForScore.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    
    
    self.labelForCount = [[UILabel alloc] initWithFrame:CGRectMake(30 * WEIGHTT + WIDTH / 15 + WIDTH / 4, WIDTH / 28, WIDTH / 12, WIDTH / 15)];
    [self addSubview:self.labelForCount];
    [_labelForCount release];
    self.labelForCount.text = @"场次";
    self.labelForCount.font = [UIFont systemFontOfSize:15];
    self.labelForCount.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    
    self.result = [[UILabel alloc] initWithFrame:CGRectMake(50 * WEIGHTT + WIDTH / 15 + WIDTH / 4 + WIDTH / 13, WIDTH / 28, WIDTH / 4, WIDTH / 15)];
    [self addSubview:self.result];
    [_result release];
    self.result.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);

    
    self.result.text = @"胜/平/负";
    self.result.font = [UIFont systemFontOfSize:15];
    
    self.ballCount = [[UILabel alloc] initWithFrame:CGRectMake(35 * WEIGHTT + WIDTH / 15 + WIDTH / 4 + WIDTH / 13 * 4, WIDTH / 28, WIDTH / 8, WIDTH / 15)];
    [self addSubview:self.ballCount];
    [_ballCount release];
    self.ballCount.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.ballCount.text = @"净胜球";
    self.ballCount.font = [UIFont systemFontOfSize:15];
    
    self.ballOfScore = [[UILabel alloc] initWithFrame:CGRectMake(46 * WEIGHTT + WIDTH / 20 + WIDTH / 15 + WIDTH / 4 + WIDTH / 13 * 5 , WIDTH / 28, WIDTH / 10, WIDTH / 15)];
    self.ballOfScore.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);

    [self addSubview:self.ballOfScore];
    [_ballOfScore release];
    
    self.ballOfScore.text = @"积分";
    self.ballOfScore.font = [UIFont systemFontOfSize:15];



}





/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
